<?php
/**
 * 潮市街路由
 */
declare(strict_types = 1);

use think\facade\Route;

/**
 * 购物车接口路由组
 */
Route::group('/cart', function () {

    /*购物车列表*/
    Route::any('cart_list','/damp.cart/cart_list');

    /*添加购物车*/
    Route::any('add_cart','/damp.cart/add_cart');

    /*编辑购物车*/
    Route::any('edit_cart','/damp.cart/edit_cart');

    /*删除购物车*/
    Route::any('del_cart','/damp.cart/del_cart');

})->middleware(\app\api\middleware\CheckAdmin::class);

/**
 *订单路由组
 */
Route::group('/item_order', function () {

    /*订单列表*/
    Route::any('order_list','/damp.item_order/order_list');

    /*生成立即购买订单*/
    Route::any('add_order','/damp.item_order/add_order');

    /*购物车提交订单*/
    Route::any('add_cart_order','/damp.item_order/add_cart_order');

    /*操作订单*/
    Route::any('action_order','/damp.item_order/action_order');

    /*订单详情*/
    Route::any('order_detail','/damp.item_order/order_detail');

    /*提交订单展示页面*/
    Route::any('show_order_info','/damp.item_order/show_order_info');


})->middleware(\app\api\middleware\CheckAdmin::class);

/**
 *我的地址信息路由组
 */
Route::group('/user', function () {

    /*地址列表*/
    Route::any('address_list','/user/address_list');

    /*地址详情*/
    Route::any('address_detail','/user/address_detail');

    /*新增/编辑地址*/
    Route::any('edit_address','/user/edit_address');


})->middleware(\app\api\middleware\CheckAdmin::class);

/**
 *限时秒杀路由组
 */
Route::group('/market', function () {

    /*秒杀列表*/
    Route::any('seckill_list','/damp.market/seckill_list');

    /*秒杀详情*/
    Route::any('seckill_detail','/damp.market/seckill_detail');

    /*新增/编辑地址*/
    Route::any('item_detail','/damp.market/item_detail');


});
